import request from '@/utils/request'

// 查询司机账号列表
export function queryUser(data) {
  return request({
    url: '/api/company/searchUser',
    method: 'post',
    data: data
  })
}

export function queryCarLeader() {
  return request({
    url: '/api/company/search-driver-leader',
    method: 'get',
  })
}

export function bindStaff(data) {
  return request({
    url: '/api/company/bindStaff',
    method: 'post',
    data: data
  })
}

export function bindStaffOnly(data) {
  return request({
    url: '/api/company/bind-staff-to-company',
    method: 'post',
    data: data
  })
}

export function bindDriverToLeader(data) {
  return request({
    url: '/api/company/bind-driver-to-leader',
    method: 'post',
    data: data
  })
}
//指定业务员
export function bindAgent(data) {
  return request({
    url: 'api/relation/bind-salesman' ,
    method: 'post',
    data: data
  })
}

//指定业务员
export function bindAgent2(userId) {
  return request({
    url: 'api/relation/bind-to-salesman/'+userId ,
    method: 'post'
  })
}
export function UnbindStaff(data) {
  return request({
    url: '/api/company/unbindStaff',
    method: 'post',
    data: data
  })
}

export function listUser() {
  return request({
    url: 'api/company/get-user-list',
    method: 'get'
  })
}


